module.exports = function($scope, FileUploader,createImportExcel){

	$scope.obj = {};

	$scope.djp = 1;

	var uploader1 = $scope.uploader1 = new FileUploader({
        url: 'https://txy.juyouhx.comApi/Api/ObjectToOss?topdir=aa&selfdir=bb'
    });
    uploader1.filters.push({
        name: 'customFilter',
        fn: function(item /*{File|FileLikeObject}*/, options) {
            return this.queue.length < 10;
        }
    });
    uploader1.onSuccessItem = function(fileItem, response, status, headers) {
    	console.log(response);
        $scope.obj.xx = response.url;
    };

    $scope.import = function(url){
    	$scope.djp = 0;
    	alert("导入成功");
    	var para = {
            'url':url
        };
    	createImportExcel.get(para, function(res){

			//console.log(res);

			/*if(res.errcode === 0)
			{*/
				alert("导入成功");
			/*}
			else
			{
				alert(res.errmsg);
			}*/

		});

    };

};